﻿@model S4Store.Models.TelSellerKpi.InputSellerKpiDayDataModel
@{
    Layout = null;
    ViewBag.Title = "InputSellerKpiDayData";
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
}

<form class="pageForm addpage" action="@Url.Action("ModifyBackInputSellerKpiDayData")" method="post">
<div style=" height:100%; width:100%; overflow:hidden" class="verticalSplitContainer">
    <div class="" style="overflow: auto;" ratio="#140">
        <input type="hidden" value="@Model.Date.Year" name="y" />
        <input type="hidden" value="@Model.Date.Month" name="m" />
        <input type="hidden" value="@Model.Date.Day" name="d" />
        <table  class="rpttable"  style="border-collapse:collapse;">
            <tr height="130"  class="vtr">
   <th class="yellow" ><div class="wd20 pd510">销售顾问姓名</div></th>
   <th class="yellow" ><div class="wd20 pd520">车型</div></th>
   <th class="yellow" ><div class="wd20 pd510">电话客户接待数</div></th>
   <th class="yellow" ><div class="wd20 pd510">电话招徕到店数</div></th>
    <th class="yellow" ><div class="wd20 pd510">有效A卡建卡数</div></th>
    <th class="yellow" ><div class="wd20 pd510">试驾邀请书填写数</div></th>
    <th class="yellow" ><div class="wd20 pd510">试驾客户未成交数</div></th>
    <th class="yellow" ><div class="wd20 pd510">商谈明细表填写数</div></th>
   <th class="yellow" ><div class="wd20 pd510">超限价格成交数</div></th>
    <th class="yellow" ><div class="wd20 pd510">二手车评估数</div></th>
    <th class="yellow" ><div class="wd20 pd510">置换成交数</div></th>
    <th class="yellow" ><div class="wd20 pd510">按揭成交数</div></th>
    <th class="yellow" ><div class="wd20 pd510">上月遗留客户新增订单</div></th>
    <th class="yellow" ><div class="wd20 pd510">当月客户新增订单数</div></th>
    <th class="yellow" ><div class="wd20 pd510">交车数</div></th>
    <th class="yellow" ><div class="wd20 pd510">新车保险投保数</div></th>
    <th class="yellow" ><div class="wd20 pd515">保险销售额(万)</div></th>
    <th class="yellow" ><div class="wd20 pd510">套餐车销售数量</div></th>
    <th class="yellow" ><div class="wd20 pd510">装潢车销售数</div></th>
    <th class="yellow" ><div class="wd30 pd510"><div class="wd20">装潢销售额(万)</div></div></th>
   <th class="yellow" ><div class="wd20 pd510">新车延保数</div></th>
    <th class="yellow" ><div class="wd20 pd510">二次邀约成功数</div></th>
    <th class="yellow" ><div class="wd20 pd510">老客户推荐成交数</div></th>


</tr>
</table>
</div>
<div class="" style="overflow: auto;" ratio="*">
 <table  class="rpttable"  style="border-collapse:collapse;">
            @{int index = -1;}
            @foreach (var seller in Model.Sellers)
            {
                for (int i = 0; i < Model.CarBrands.Count; i++)
                {
                    index++;
                    var brand = Model.CarBrands[i];
                    var daydata = Model.GetDayData(seller.Id, brand.Id);
                    <tr height="26">
                        @if (i == 0)
                        {
                            <td rowspan="@Model.CarBrands.Count"><div class="wd20 pd510">@seller.Name</div></td>
                        }
                        <td><div class="wd40 pd510">@brand.Name
                            
                            <input type="hidden" value="@seller.Id" name="rows[@(index)].SellerId" />
                            <input type="hidden" value="@brand.Id" name="rows[@(index)].CarBrandId" />
                            <input type="hidden" name="rows[@(index)].Date" value="@daydata.Date.ToString("yyyy-MM-dd")" /></div>
                        </td>
                        <td><div class="wd30 pd55"><input type="text"  name="rows[@(index)].LDJDPC" value="@daydata.LDJDPC" class="w20 ipt numberinput  " /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].SCLDKHDJS" value="@daydata.SCLDKHDJS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].YXAKJKS" value="@daydata.YXAKJKS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].SJYQSTXS" value="@daydata.SJYQSTXS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].SJKHCJS" value="@daydata.SJKHCJS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].STMXBTXS" value="@daydata.STMXBTXS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].CXJGCJS" value="@daydata.CXJGCJS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].ESCPGS" value="@daydata.ESCPGS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].ZHCJS" value="@daydata.ZHCJS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].AJCJS" value="@daydata.AJCJS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].SYYLKHXZDD" value="@daydata.SYYLKHXZDD" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].DYKHXZDD" value="@daydata.DYKHXZDD" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].JCS" value="@daydata.JCS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].XCBXTBS" value="@daydata.XCBXTBS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd40 pd55"><input type="text" name="rows[@(index)].BXXSE" value="@daydata.BXXSE" class="w30 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].TCCXSSL" value="@daydata.TCCXSSL" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].YXZHCXSSL" value="@daydata.YXZHCXSSL" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd40 pd55"><input type="text" name="rows[@(index)].ZHCZHXSE" value="@daydata.ZHCZHXSE" class="w30 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].XCYBS" value="@daydata.XCYBS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].ECCGYYKHS" value="@daydata.ECCGYYKHS" class="w20 ipt numberinput" /></div></td>
                        <td><div class="wd30 pd55"><input type="text" name="rows[@(index)].DYLKHTJCJS" value="@daydata.DYLKHTJCJS" class="w20 ipt numberinput" /></div></td>
                    </tr>  
                }
  <tr><td colspan="23" style="background:#757576; height:2px; padding:0"></td></tr>
            }
        </table>

    </div>
    @if (!Model.IsConfirmed || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
    {
        <div class="formBar" ratio="#30">
            <ul>
                <li><div class="simplebutton"><div class="r"><button type="button" class="submit">保存</button></div></div></li>	
                <li>确认数据：<input type="checkbox" name="isconfirm" value="true" /></li>	
            </ul>
        </div>
    }
</div>
</form>